package com.d0309;

public class Person {
    protected String name;
    protected int age;
    protected String sex;
    public Person(int age){
        this.age=age;
        System.out.println(age);
    }
    public void run(){
        System.out.println("跑步");
    }

    public static void main(String[] args) {
        Husband husband=new Husband();
        System.out.println(husband.name);
        //Person person=new Person(10);
        //person.drive();//父类不能调用子类的方法
        husband.run();
        //husband.drive();
    }
}
